<extend name="Base/common"/>
<block name="body">
    <section class="container">
      <div class="where hidden-xs">
        <ul class="breadcrumb">
          <li>当前位置：</li>
          <li><a href="{:url_route('index')}">{:C('TITLE')}</a></li>
          <if condition="$da['nav']">
            <li><a href="{:url_route($da['url'])}">{$da['nav']}</a></li>
          <else/>
          	<notempty name="tags[0]"> 
               <li><a href="{:url_route('tags/'.$tags[0]['name'].'/id/'.$tags[0]['id'])}">{$tags[0]['tag_name']}</a></li>
            </notempty>
          </if>
           <li><a href="">{$info.title}</a></li>
        </ul>
      </div> 
      <div class="content-wrap">
          <div class="content" style="padding: 0 20px 20px 20px;background-color: #fff;border: 1px solid #EAEAEA;border-radius: 4px;">
              <header class="article-header">
                  <h1 class="article-title">
                        <if condition="$info['count'] gt 1">
                             <a  href="" title="{$info.title}">{$info.title}</a>
                        <else/>
                           <a href="" title="{$info.title}">{$info.title}</a>
                        </if>
                  </h1>
                  <div class="article-meta">
                      <span class="item article-meta-time">
                          <time class="time" data-toggle="tooltip" data-placement="bottom"><i class="glyphicon glyphicon-time"></i>&nbsp; {$info.create_time|date='Y-m-d',###}</time>
                      </span>
                      <span class="item article-meta-source" data-toggle="tooltip" data-placement="bottom" title="" ">
                          <i class="glyphicon glyphicon-globe"></i>&nbsp;{:C('TITLE')}</span>
                     
                      <span class="item article-meta-views" data-toggle="tooltip" data-placement="bottom" title=""">
                          <i class="glyphicon glyphicon-eye-open"></i>&nbsp;{$info['view']}</span>
                     
                  </div>
              </header>
              <article class="excerpt-minic excerpt-minic-index">
                  <p class="note">简介：{$info.description}</p>
              </article>
              <article class="article-content">
                <div>{:strip_tags($info['content'],'<img><br/><br>')}</div>
                <div class="article-tags" id="article-tags">
                    <if condition="$tags">
                    <a href="{:url_route('tags')}">标签：</a>
                    <volist name="tags"  id="data">
                     <if condition="$data['tag_name']">
                       <if condition="$data['count'] gt 1">
                         <a href="{:url_route('tags/'.$data['name'].'/id/'.$data['id'])}">{$data['tag_name']}</a>
                      <else/>
                          <a href="{:url_route('tags/'.$data['name'])}">{$data['tag_name']}</a>
                       </if>
                       </if>
                    </volist>
                    </if>
                </div>
                  <div class="share-list hidden-xs">
                    <div class="bdsharebuttonbox bdshare-button-style0-16" data-bd-bind="1496809261006">
                      <a class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
                      <a class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
                      <a class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
                      <a class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
                      <a class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
                      <a class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
                      <a class="bds_kaixin001" data-cmd="kaixin001" title="分享到开心网"></a>
                    </div>
                  </div>
                  <div class="fr preDoc">
                 <neq  name="preDoc" value="1">
                  <if condition="$preDoc['count'] gt 1">
                 		<a class="preT" href="{:url_route('detail/'.$preDoc['pin_yin'].'/'.'id'.'/'.$preDoc['id'])}" title="{$preDoc['title']}">
              	  <else/>
                 	   <a class="preT" href="{:url_route('detail/'.$preDoc['pin_yin'])}" title="{$preDoc['title']}">
              	  </if>
                      	上一篇</a>
                   </neq >
                   <if condition="$preDoc neq 1 and $nextDoc neq 1"><span class="hidden-xs">&nbsp;|&nbsp;</span></if>
                   <neq  name="nextDoc"  value="1">
                   <if condition="$nextDoc['count'] gt 1">
                 		<a class="fr" href="{:url_route('detail/'.$nextDoc['pin_yin'].'/'.'id'.'/'.$nextDoc['id'])}" title="">
              	  <else/>
                 	   <a class="fr" href="{:url_route('detail/'.$nextDoc['pin_yin'])}" title="{$nextDoc['title']}">
              	  </if>
                      	下一篇</a>
                  </neq>
                  </div>
                  <!--end-->
                  <div style="padding-top: 30px;">
                    <if condition="is_array($relative_article) ">
                      <div class="article_title">相关文章</div>
                    </if>
                    <volist name="relative_article" id="relate">
                    <article class="excerpt excerpt-1">
                      <if condition="$relate['count'] gt 1">
                      <a class="focus" href="{:url_route('detail/'.$relate['pin_yin'].'/'.'id'.'/'.$relate['id'])}" title="{$relate['title']}" target="_blank" draggable="false">
                     <else/>
                        <a class="focus" href="{:url_route('detail/'.$relate['pin_yin'])}" title="{$relate['title']}" target="_blank">
                     </if>
                      
                        <img class="thumb" data-original="{$relate['cover_id']}" src="{$relate['cover_id']}" alt="{$relate['title']}" style="display: inline;" draggable="false">
                      </a>
                       <if condition="$relate['count'] gt 1">
                      <a class="" href="{:url_route('detail/'.$relate['pin_yin'].'/'.'id'.'/'.$relate['id'])}" title="{$relate['title']}" target="_blank" draggable="false">
                     <else/>
                        <a href="{:url_route('detail/'.$relate['pin_yin'])}" title="{$relate['title']}" target="_blank">
                     </if>
                     <!--  <a href="/detail/xia_ji_fu_zhuang_da/id/739.html" title="" target="_blank"> -->
                          <header class="detail_header"><h2 title="{$relate['title']}">{$relate['title']}</h2></header>
                          <p class="detail_note note">
                              <if condition="strlen($data['description']) gt 128">
                         {:mb_substr($relate['description'],0,128)."..."}
                     
                      <else/>
                         {$relate['description']}
                      </if>
                          </p>
                          <p class="meta">
                              <time class="time">
                                  <i class="glyphicon glyphicon-time"></i>&nbsp;{:date('Y-m-d',$relate['create_time'])}</time>
                              <span class="views"><i class="glyphicon glyphicon-eye-open"></i>&nbsp;{$relate['view']}</span>
                          </p>
                      </a>
                    </article>
                    <div class="line"></div>
                    </volist>
                  <!--end-->
                </div>  
              </article>  
              <div class="relates clearfix"></div> 	

          </div>  
          
      </div>
      <aside class="sidebar detail_sidebar">
        <if condition="0">

        </if>
       
        <div class="fixed">
            <if condition="$category neq ''">
                <div class="widget widget_sentence">
                  <h3><a href="{:url_route('cate')}">分类</a></h3>
                  <div class="tag-cloud">
                    <volist name="category"  id="data">
                       <a class="" href="{:url_route('cate/'.$key)}">{$data}</a> 
                    </volist>
                </div>
              </div>
            </if>
            <script type="text/javascript">
              /*过滤某些样式*/
              $('.content-wrap').find('*').not('img').css({'border':'','width':'','height':'','position':'', 'float':'','margin-top':''});
              //$('.content-wrap').find('*').not('img').removeAttr('style');
              /*dom结构异常处理*/
              var domOk = $('div.content-wrap').next().is('.sidebar');
              if(!domOk){
                $('.sidebar').insertAfter('.content-wrap')
              }
              if(!$('.article-content').next().is('.relates')){
                $('.relates').insertAfter('.article-content');
               // $('.article-tags').insertAfter('.relates').next().remove();
              }

              var text = '刚刚在梧桐珆发现了 #' + $('.detailtop_title').text() + ' #';
              window._bd_share_config = {
                  common: {
                      bdText: text,
                      bdDesc : '',
                      bdPic: "",
                      bdMini: "2",
                      bdMiniList: false,
                      bdStyle: "0"
                  },
                  share: [{
                    // "bdSize": "24",
                      bdCustomStyle: 'http://statics.wttai.com/debug/css/share.css'
                  }]
              }
              with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=' + ~(-new Date() / 36e5)];
            </script>

            <div class="widget widget_hot col-sm-12">
              <h3>推荐店铺</h3>
              <ul>
                <volist name="shopInfo" id="v">
                  <li>
                    <a title="" href="{$v['store_url']}" target="_blank" draggable="false">
                      <span class="thumbnail">
                        <img class="thumb" src="{$v['shop_logo']}" alt="" style="display: block;" draggable="false"></span>
                      <span class="text" style="margin-top:8px">{$v['store_name']}</span>
                      <span class="muted multiple-ellipsis2">{$v['store_introduction']}</span>
                    </a>
                  </li>
                </volist>
              </ul>
            </div>
            <!-- end -->
            <div class="widget widget_sentence col-sm-12 hidden-xs">
              <h3><a href="{:url_route('tags')}">标签</a></h3>
              <div class="tag-cloud">
                <if condition="$tags">
                  <div id="" class="">
                  <!-- <div id="tagbox" class="tag-box"> -->
                      <volist name="tags"  id="tag">
                        <if condition="$tag['tag_name']">
                          <a href="{:url_route('tags/'.$tag['name'])}">{$tag['tag_name']}</a> 
                        </if>
                      </volist>
                    </div>
                </if>
                <div class="gzh" style="padding:15px 0 10px 0;float:left">
                  <img src="/Public/images/gzh.png" alt="梧桐珆公众号" style="width:40%;float:left">
                  <div style="float:left;margin:6px 0 10px 10px">
                    <h4>
                        梧桐珆公众号
                    </h4>
                    <div style="width:20px;border-bottom:2px #111 solid;height:0;font-size:0;margin:15px 0 15px 0;"></div>
                    <p>
                      扫码关注微信公众号<br>
                      找原创货源 上梧桐珆
                    </p>
                  </div>
                </div>
              </div>
            </div>
        </div>
      </aside>


        <style type="text/css" media="screen">
          a.prev, a.next {
            display: block;
            width: 108px;
            height: 282px;
            position: fixed;
            left: 50%;
            top: 45%;
            margin-top: -141px;
            background: url('/Public/images/arrow.png') no-repeat;
            text-indent: -9999rem;
          }
          a.prev {
              margin-left: -760px;
              background-position: 0 0;
          }
          a.next {
              margin-left: 650px;
              background-position: 0 -300px;
          }
          a.prev:hover, a.next:hover {
              background-color: #fff;
          }
        </style>
        		<!-- 	<if condition="$preDoc['count'] gt 1">
                 <a class="prev"  href="{:url_route('detail/'.$preDoc['pin_yin'].'/'.'id'.'/'.$preDoc['id'])}" title="{$preDoc['title']}">
              	  <else/>
                 	   <a class="prev"  href="{:url_route('detail/'.$preDoc['pin_yin'])}" title="{$preDoc['title']}">
              	  </if>
                      	上一篇</a>
                   <if condition="$nextDoc['count'] gt 1">
                 		<a class="next" href="{:url_route('detail/'.$nextDoc['pin_yin'].'/'.'id'.'/'.$nextDoc['id'])}" title="">
              	  <else/>
                 	   <a class="next" href="{:url_route('detail/'.$nextDoc['pin_yin'])}" title="{$nextDoc['title']}">
              	  </if>
       			下一篇</a> -->



    </section>
    <script type="text/javascript">
        $('.article-content img').removeAttr('style');
    </script>
</block>

